home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6419 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: millenium.texas.net!gcherer
  2. From: gcherer@millenium.texas.net (GT Cherer)
  3. Newsgroups: comp.lang.c
  4. Subject: Huge file performance question
  5. Date: 24 Feb 1996 18:56:11 GMT
  6. Organization: Texas Networking, Inc.
  7. Message-ID: <4gnn0b$nja@nntp.texas.net>
  8. NNTP-Posting-Host: millenium.texas.net
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. so, the task is to take 9 100meg+ files and split them into 200-600
  12. little files. sounds like a futuristic prison scenario.....
  13.  
  14. the records are 600 bytes or better. the little files are based on a 2 
  15. byte key. the hp this runs on can't handle sorting the big files, and the 
  16. fopen_max (20-60 open file maximum) constrains having 200-600 files open 
  17. at once. 
  18.  
  19. my first guess was to make an array of the key and an ftell position, 
  20. sort that array, then fseek into each of the big files. that licks the 
  21. big-sort problem and the max files open problem, but it sure seems like a 
  22. lot of overhead.
  23.  
  24. this sounds like the kind of nut that has been cracked a bazillion times 
  25. before. how does one approach a problem involving over-max sort size and 
  26. over-max open files especially in light of performance?? 
  27.  
  28. this is a unix system, so using split to break up the files is an option, 
  29. but i'm not sure it speeds things up (split/sort vs ftell/sort/fseek) and 
  30. it adds a disk-space component (original file/split files/output files).
  31.  
  32. i am in a conundrum and sure could use an experienced hand to point the 
  33. way, not so much to solve the problem, but rather how to go about setting 
  34. and evaluating criteria. 
  35.  
  36.  
  37. --
  38. G.T. Jeff Cherer gcherer@texas.net
  39. Voice: 210-532-7524 SnailMail: 1132 Vanderbilt St. 78210
  40. "Rolling rocks down a 10,000 ft mountain, they can't be stopped.
  41. Not because of the rock, but because of the mountain.'
  42. Du Mu, 9th century
  43.